package cn.huiyunche.base.service.enums;


/**
 * 性别枚举
 *
 * @author houjianhui
 */
public enum GenderEnum {
    F("F", "女"),
    T("M", "男");

    private final String value;
    private final String text;

    GenderEnum(String value, String text) {
        this.value = value;
        this.text = text;
    }

    public String getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static GenderEnum getByValue(String value) {
        for (GenderEnum temp : GenderEnum.values()) {
            if (temp.getValue().equals(value)) {
                return temp;
            }
        }
        return null;
    }
}
